﻿using FreeSql.DataAnnotations;
using GalaSoft.MvvmLight;
using Newtonsoft.Json;
using PropertyChanged;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;

namespace sys_Print.DataAsset
{
    [AddINotifyPropertyChangedInterface]
    [JsonObject(MemberSerialization.OptIn), Table(Name = "content_template_mapping")]
    public class ContentTemplateMapping : ObservableObject
    {
        [JsonProperty, Column(Name = "id", IsPrimary = true, IsIdentity = true)]
        public int Id { get; set; }

        [JsonProperty, Column(Name = "content_model_id")]
        public int ContentModelId { get; set; }

        [JsonProperty, Column(Name = "Print_model_id")]
        public int PrintModelId { get; set; }

        [JsonProperty, Column(Name = "product_series_id", DbType = "varchar(255)")]
        public string ProductSeriesId { get; set; }

        [JsonProperty, Column(Name = "custom_id", DbType = "varchar(255)")]
        public string CustomId { get; set; }

        [JsonProperty, Column(Name = "canvas_id")]
        public int CanvasId { get; set; }

        [JsonProperty, Column(Name = "note", DbType = "varchar(255)")]
        public string Note { get; set; }

        [Column(IsIgnore = true)]
        public bool IsChanged { get; set; }

        [Column(IsIgnore = true)]
        public List<string> SelectedItems { get; set; }


        public void AcceptChanges()
        {
            IsChanged = false;
        }
        



    }
}
